package com.woniuxy.intellihome.service.impl;

import com.woniuxy.intellihome.entity.Collect;
import com.woniuxy.intellihome.mapper.CollectMapper;
import com.woniuxy.intellihome.service.CollectService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类，
 * </p>
 *
 * @author jobob
 * @since 2021-08-11
 */
@Service
public class CollectServiceImpl extends ServiceImpl<CollectMapper, Collect> implements CollectService {
    @Autowired
    private CollectMapper collectMapper;
    @Override
    public void delByUserIdWithSkuId(int userId, int skuId) {
        collectMapper.delByUserIdWithSkuId(userId,skuId);
    }

    @Override
    public List<Collect> getByUserId(int userId) {
        return collectMapper.getByUserId(userId);
    }

    @Override
    public void addByUserIdWithSkuId(int userId, int skuId, String time) {
        collectMapper.addByUserIdWithSkuId(userId,skuId,time);
    }


}
